<input type="hidden" name="timeout" id="timeout" value="{$timeout->param_content}" />
{literal}
    <script type="text/javascript">
		timeoutVal = $('#timeout').val();
		timeout(timeoutVal, 'pub2');
	</script>
{/literal}

<div class="wrap">
    {if isset($pub1->pub_tag)}{$pub1->pub_tag}{/if}
</div>
{literal}
    <script type="text/javascript">
        timeout(timeoutVal, 'pub3');
     </script>
{/literal}

<div class="wrap" id="pub2">
    {if isset($pub2->pub_tag)}{$pub2->pub_tag}{/if}
</div>

{literal}
    <script type="text/javascript">
        timeout(timeoutVal, 'pub4');
     </script>
{/literal}
<div id="pub3">
    {if isset($pub3->pub_tag)}{$pub3->pub_tag}{/if}
</div>

{literal}
    <script type="text/javascript">
        timeout(timeoutVal, 'pub5');
     </script>
{/literal}

<div class="wrap" id="pub4">
    {if isset($pub4->pub_tag)}{$pub4->pub_tag}{/if}
</div>
{literal}
    <script type="text/javascript">
        timeout(timeoutVal, 'pub6');
     </script>
{/literal}

<div class="wrap" id="pub5">
    {if isset($pub5->pub_tag)}{$pub5->pub_tag}{/if}
</div>


<div id="pub6">
    {if isset($pub6->pub_tag)}{$pub6->pub_tag}{/if}
</div>